package squirrel

import scala.util.{Success, Try}

sealed trait SqlColumn {
  def toSQL: Try[ParameterizedSQL]
}
case class SqlColumnSimple(col: String) extends SqlColumn {
  override def toSQL: Try[ParameterizedSQL] =
    Success(ParameterizedSQL(col, Seq()))
}

case class SqlColumnAlias(col: String, alias: String) extends SqlColumn {
  override def toSQL: Try[ParameterizedSQL] =
    Success(ParameterizedSQL(s"$col AS $alias", Seq()))
}
